package com.axonactive.yolo.service.interfaces;

import java.util.List;

import com.axonactive.yolo.domain.UserEmail;
import com.axonactive.yolo.exception.UserEmailNotFoundException;

public interface UserEmailService {
	public UserEmail create(UserEmail useremail);

	public void delete(int id) throws UserEmailNotFoundException;

	public List<UserEmail> findAll();

	public UserEmail update(UserEmail useremail) throws UserEmailNotFoundException;

	public UserEmail findById(int id);

	public List<UserEmail> findAllEmailByUserId(int userId);

	public void deleteUserEmailByUserIdAndEmail(int userId, String email) throws UserEmailNotFoundException;

	/**
	 * Switch email between primary and secondary
	 * @param userId
	 * @param email
	 * @return true if success
	 * @throws UserEmailNotFoundException
	 */
	public boolean swithPrimaryToSecondaryEmail(int userId, String email) throws UserEmailNotFoundException;

	public UserEmail findByEmailString(String email);
	
	public List<UserEmail> getUnactivedEmail();

	boolean setActivationAccountLinkParam(UserEmail userEmail, String param);
}
